From 76d350a2439300952a66e7028c4746ce7f290b97 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 8 Nov 2005 21:34:03 +0000 Subject: [PATCH] Add reads of MacStumbler. --- gpsbabel/netstumbler.c | 18 +++++++++++++++++- gpsbabel/readme.xml | 3 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gpsbabel/netstumbler.c b/gpsbabel/netstumbler.c index aa0d52b7d..241428558 100644 --- a/gpsbabel/netstumbler.c +++ b/gpsbabel/netstumbler.c @@ -1,7 +1,7 @@ /* Read Netstumbler data files. - Copyright (C) 2004 Robert Lipe, robertlipe@usa.net and + Copyright (C) 2004, 2005 Robert Lipe, robertlipe@usa.net and John Temples; gpsns@xargs.com This program is free software; you can redistribute it and/or modify @@ -30,6 +30,7 @@ static char *nsneicon = NULL; static char *seicon = NULL; static char *sneicon = NULL; static char *snmac = NULL; +static int macstumbler; static void fix_netstumbler_dupes(void); @@ -53,6 +54,7 @@ static void rd_init(const char *fname) { file_in = xfopen(fname, "r", MYNAME); + macstumbler = 0; } static void @@ -91,6 +93,14 @@ data_read(void) tm.tm_mday = atoi(&ibuf[20]); } + /* + * Mac stumbler files are the same, except + * use DDMM.mmm instad of DD.DDDD. + */ + if (strstr(ibuf, "Creator: MacStumbler")) { + macstumbler = 1; + } + continue; } @@ -104,12 +114,18 @@ data_read(void) lat = atof(&field[2]); if (field[0] == 'S') lat = -lat; + if (macstumbler) { + lat = ddmm2degrees(lat); + } break; case 1: /* long */ lon = atof(&field[2]); if (field[0] == 'W') lon = -lon; + if (macstumbler) { + lon = ddmm2degrees(lon); + } break; case 2: /* ( SSID ) */ diff --git a/gpsbabel/readme.xml b/gpsbabel/readme.xml index 8c5a69b77..6711e1110 100644 --- a/gpsbabel/readme.xml +++ b/gpsbabel/readme.xml @@ -285,6 +285,8 @@ of your original road layer. Note that the ! is a shell metacharacter in bash and possibly other shells, so you may have to use single quotes or some other escape mechanism. + There is a tutorial how to create an onramp for a limited access highway in Street Atlas USA using GPSBabel. +
@@ -1105,6 +1107,7 @@ SSID in the description. Different icons are assigned to encrypted, non-encrypted, stealth, and non-stealth access points; these may be changed with options. Import only. +This format also works with MacStumbler. Additional options: - Name of icon used for -- 2.30.2